<?php
	session_start();
	mysql_connect("localhost", "sapmenet_admin", "a1s2d3f4g5h6j7") or die ("Problem with datebase");
	mysql_select_db("sapmenet_users");
	$imaa=mysql_query ("SELECT userID FROM comments WHERE id={$_POST['commentID']}");
	if (mysql_num_rows($imaa)>0)
	{
		$imaa=mysql_result($imaa, 0);
		if ($imaa==$_SESSION['JID'])
		{
			mysql_query("DELETE FROM comments WHERE id={$_POST['commentID']}");
		}
		else
		{
			echo "napsyvai";
		}
	}
	else
	{	
		echo	"napsyvai";
	}
?>